import { FormSchema } from '@/components/Form';
import { BasicColumn } from '@/components/Table';

// 表单配置
export const searchFormSchema: FormSchema[] = [
  {
    field: 'taskName',
    label: '搜索',
    component: 'Input',
    colProps: { span: 6 },
    componentProps: {
      placeholder: '请输入任务名称/报表名称',
    },
  },
  {
    field: 'date',
    label: '填报期',
    component: 'MonthPicker',
    componentProps: {
      style: {
        width: '100%',
      },
    },
    colProps: {
      span: 6,
    },
  },
  {
    field: 'status',
    label: '填报状态',
    component: 'Select',
    componentProps: {
      options: [
        { label: '全部', value: 0 },
        { label: '已发未填', value: 1 },
        { label: '已发已填', value: 2},
        { label: '未发表', value: 3},
      ],
    },
    colProps: {
      span: 6,
    },
  },
  {
    field: 'action',
    label: ' ',
    component: 'Input',
    slot: 'action',  // 添加操作按钮插槽
    colProps: {
      span: 6,
    },
  }
];

// 表格列配置
export const columns: BasicColumn[] = [
  {
    title: '企业名称',
    dataIndex: 'companyName',
    width: 150,
    fixed: 'left',
  },
  {
    title: '填报状态',
    dataIndex: 'reportState',
    width: 120,
    fixed: 'left',
  },
  {
    title: '发表时间',
    dataIndex: 'startTime',
    width: 180,
  },
  {
    title: '结束时间',
    dataIndex: 'endTime',
    width: 180,
  },
];
